﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using daSyntaxAnalyser.SyntaxTree;

namespace CQLQueries.SyntaxTree
{
    public class TermNode
    {
        public object NodeTree;
        public object ValueUp;

        public FactorNode Factor;
        public Term2Node Term2;

        public TermNode()
        {            
        }

        public void Visit()
        {
            Factor.NodeTree = NodeTree;
            Factor.Visit();
            if (Term2 != null)
            {
                Term2.ValueDown = Factor.ValueUp;
                Term2.NodeTree = NodeTree;
                Term2.Visit();
                ValueUp = Term2.ValueUp;
            }
            else ValueUp = Factor.ValueUp;
        }
    }
}
